package com.github.cyf.controller;

import com.github.cyf.common.model.Rs;
import com.github.cyf.entity.SequentialUserVo;
import com.github.cyf.entity.group.SequentialGroup;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenyifan
 * @create 2024-10-12 17:48
 */
@RestController
@RequestMapping("/sequential")
@Validated
@Api(tags = "4、组序列校验")
@ApiSupport(order = 4)
public class SequentialController {

    @PostMapping("/sequential")
    @ApiOperation("顺序校验用户信息")
    public Rs sequential(@RequestBody @Validated(value = SequentialGroup.class) SequentialUserVo user) {
        return Rs.ok("校验成功").setData(user);
    }
}
